package thriftMyTest;

import org.apache.thrift.server.TServer;
import org.apache.thrift.server.TSimpleServer;
import org.apache.thrift.transport.TServerSocket;
import org.apache.thrift.transport.TServerTransport;
import org.apache.thrift.transport.TTransportException;

/**
 * Created with IntelliJ IDEA.
 * MyUser: belict
 * Date: 11/30/13
 * Time: 6:42 PM
 * To change this template use File | Settings | File Templates.
 */
public class Server {
    public static void main(String[] args) throws TTransportException {
        TestInfoHandler testInfo = new TestInfoHandler();
        TestInfo.Processor processor = new TestInfo.Processor(testInfo);

        TServerTransport transport = new TServerSocket(9091);
        TSimpleServer tSimpleServer = new TSimpleServer(new TServer.Args(transport).processor(processor));

        System.out.println("starting");
        tSimpleServer.serve();

    }

}
